<div class="m-tab s-tab">
	<h2 class="u-tt">用户管理</h2>
	<ul>
		<li><a href="{$url|'User/index'}">用户列表</a></li>
		<li class="z-crt"><a href="{$url|'User/add'}">添加用户</a></li>
	</ul>
</div>
<div class="m-form">
	<form name="" action="{$url|'User/addData'}" method="post" id="form">
		<fieldset>
			<div class="formitm">
				<label class="lab">用户组：</label>
				<div class="ipt">
					<select class="u-slt" name="group_id" id="group_id">
						<!--{loop="$groupList $vo"}-->
						<option value="{$vo.group_id}" {if="$vo['group_id']==$info['group_id']"}selected="selected"{/if} >{$vo.name}</option>
						<!--{/loop}-->
					</select>
				</div>
			</div>
			<div class="formitm">
				<label class="lab">用户名/登录名：</label>
				<div class="ipt">
					<input name="username" type="text" class="u-ipt u-ipt-5" id="username" value="" maxlength="18" datatype="s4-18" errormsg="用户名至少4个字符,最多18个字符！" />
					<p></p>
				</div>
			</div>
			<div class="formitm">
				<label class="lab">昵称：</label>
				<div class="ipt">
					<input name="nicename" type="text" class="u-ipt u-ipt-5" id="nicename" maxlength="18" datatype="s4-18" errormsg="昵称至少4个字符,最多18个字符！" />
					<p></p>
				</div>
			</div>
			<div class="formitm">
				<label class="lab">邮箱：</label>
				<div class="ipt">
					<input name="email" type="text" class="u-ipt u-ipt-5" id="email"  value="" maxlength="25" datatype="e" errormsg="邮箱格式不正确！" />
					<p></p>
				</div>
			</div>
			<div class="formitm">
				<label class="lab">等级：</label>
				<div class="ipt">
					<input name="level" type="text" class="u-ipt u-ipt-2" id="level" value="{$userInfo.level}" maxlength="3" datatype="n" errormsg="等级只能为数字！" />
					<span class="suffix">你能创建用户的最高等级为 {$userInfo.level}</span> 
					<p></p>
				</div>
			</div>
			<div class="formitm">
				<label class="lab">密码：</label>
				<div class="ipt">
					<input name="password" type="password" class="u-ipt u-ipt-5" id="password" value="" maxlength="18" datatype="*4-18" errormsg="密码至少4个字符,最多18个字符！" />
					<p></p>
				</div>
			</div>
			<div class="formitm">
				<label class="lab">重复密码：</label>
				<div class="ipt">
					<input name="password2" type="password" class="u-ipt u-ipt-5" id="password2"  value="" maxlength="18"  datatype="*" recheck="password" errormsg="您两次输入的密码不一致！" />
					<p></p>
				</div>
			</div>
			
			<div class="formitm formitm-1  formitm-2">
				<button class="u-btn" type="submit">保存</button>
				<button class="u-btn s-btn-c3" type="reset">重置</button>
				<span class="status" id="status"></span> </div>
		</fieldset>
	</form>
</div>
<script>
Do.ready('base','form','dialog',function() {
	$('#form').duxForm({returnUrl:'{$url|"User/index"}'});
});
</script>